package day13.inner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Hotel {
    public String name;
    public String addr;
    public String tele;
    Zhizhao zh=new Zhizhao("包河区工商局","包003030","餐饮行业许可证","2020-1","2025-12");
    public void show(){
        System.out.println("这家宾馆叫"+name+",位于"+addr+",电话是："+tele);
        zh.show();
    }
    class Zhizhao{
        String banfa;
        String no;
        String name;
        String from;
        String to;

        public Zhizhao(String banfa, String no, String name, String from, String to) {
            this.banfa = banfa;
            this.no = no;
            this.name = name;
            this.from = from;
            this.to = to;
        }

        public void show(){
            System.out.println(banfa+","+no+",name:"+name+",从"+from+"到"+to);
            System.out.println("发给"+Hotel.this.name);
            //Hotel.this.show();
            //每一个内部类都持有外部类对象的引用,外部类的名字.this
        }
    }


}
